<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="${ctx}/scripts/jquery-1.4.2.min.js"></script> 
<script type="text/javascript" src="${ctx}/scripts/jquery.pagination.js"></script>
<script   type="text/javascript" >
 $(document).ready(function() { 
	   
	  $.get("${ctx}/web/Web/showAjaxNews.do", {
	           Action:"get",newsid:"<%=request.getParameter("newsid")%>"}, function (data, textStatus){	 
	                                          
	          var objs = eval("["+data+"]");
	               
	          if(objs[0].id==''){
	             document.getElementById("newsid").value='';
	              $('#br_bottom').html('');
	             alert('该栏目不对外公开请登录!');
	          }else{
	          $('#nr_top').html(objs[0].categoryname);
	          $('#nr_title').html('<h2>'+objs[0].newstitle+'</h2><p>'+objs[0].newscreatetime+'</p>');
	          
	                  if( objs[0].newsimgs != undefined && objs[0].newsimgs != ''){
	          	           var temp_imgs = (objs[0].newsimgs).split(";");
	          	           for( var x = 0 ; x < temp_imgs.length-1; x++){
                                   //   alert('${ctx}'+temp_imgs[x]);
	          	              $('#newscontent').append('<img style="width:500px; height:700px;margin:0 auto;display:block;" src="${ctx}'+temp_imgs[x]+'"');
	          	           
	          	           }
	            }
	          $("#newscontent").append('<p>&nbsp;&nbsp;&nbsp;&nbsp;'+objs[0].newscontent+'</p>');
	          }  
	       });		
 }); 
</script>
<title>立功台</title>
<link href="${ctx}/css/jiang.css" rel="stylesheet" type="text/css" /> 
<link href="${ctx}/css/hb.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/css/index.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="jl_box">
     <input type="hidden" id="newsid" name="newsid" value="<%=request.getParameter("newsid")%>" /> 
    <div class="jl_box2">
	  <div class="gr_tupian"> 
    	<div class="gr_title" id="nr_top"  > </div>  
        <div id="nr_title" class="nr_title"  style="width:800px">
        	<h2 id="newtitile"> </h2>
            <p id ="newscreatetime"> </p>
        </div>
        <div id ="newscontent"  class="nr_wenzi">
        	<p> </p>
        </div>
        <div class="br_bottom" id="br_bottom" style="width:800px">
        	<a href="javascript:downloadNews();" class="baocun">保存</a><a href="javascript:printNews();" class="dayin">打印</a>
        </div> 
     </div>
     
    </div>
    
</div>

</body>
</html>
